package cool.taomu.toolkit.impl

import cool.taomu.toolkit.inter.IStoreKeyValue
import java.util.Map
import java.util.concurrent.ConcurrentHashMap

class StoreKeyValue<K, V> implements IStoreKeyValue<K, V> {
	val store = new ConcurrentHashMap<K, V>();

	override toString() {
		this.store.toString();
	}

	override hashCode() {
		this.store.hashCode;
	}

	override equals(Object o) {
		this.store.equals(o)
	}

	override putIfAbsent(K key, V value) {
		this.store.putIfAbsent(key, value)
	}

	override remove(Object key, Object value) {
		this.store.remove(key, value);
	}

	override replace(K key, V value) {
		this.store.replace(key, value)
	}

	override replace(K key, V oldValue, V newValue) {
		this.store.replace(key, oldValue, newValue)
	}

	override clear() {
		this.store.clear
	}

	override containsKey(Object key) {
		this.store.containsKey(key)
	}

	override containsValue(Object value) {
		this.store.containsValue(value)
	}

	override entrySet() {
		this.store.entrySet
	}

	override get(Object key) {
		this.store.get(key)
	}

	override isEmpty() {
		this.store.isEmpty
	}

	override keySet() {
		this.store.keySet
	}

	override put(K key, V value) {
		this.store.put(key, value)
	}

	override putAll(Map<? extends K, ? extends V> m) {
		this.store.putAll(m)
	}

	override remove(Object key) {
		this.store.remove(key)
	}

	override size() {
		this.store.size
	}

	override values() {
		this.store.values
	}
}
